This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
Here is something from a project a few years ago....
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim uName As NotesName
Dim pndoc As NotesDocument
Dim pndoc1 As NotesDocument
Dim pnview As NotesView
Dim pnview1 As NotesView
Set db=session.CurrentDatabase
Set uName = session.CreateName(session.EffectiveUserName)
Set pnview = db.GetView("byOldPN")
Set pnview1 = db.GetView("byNewPN")
Set sheet = xls.Worksheets(1)
SheetName$=Trim(sheet.name)
x% = 0
Do While True
With sheet
x% = x% + 1
CellValueA$=sheet.range("A"+Ltrim(Str$(x%))).value 'old pn
CellValueB$=sheet.range("B"+Ltrim(Str$(x%))).value 'new pn
CellValueC$=sheet.range("C"+Ltrim(Str$(x%))).value 'old desc
CellValueD$=sheet.range("D"+Ltrim(Str$(x%))).value 'new desc
If Not Lcase(Fulltrim( CellValueA$ ))= "old item number" Then
If Not ( CellValueA$ = "" _
And CellValueB$ = "" _
And CellValueC$ = "" _
And CellValueD$ = "" ) Then
Call pnview.Refresh
Set pndoc = pnview.GetDocumentByKey(CellValueA$ , True)
If Not pndoc Is Nothing Then
Print "Duplicate Old Part Number: " & CellValueA$
End If
Call pnview1.Refresh
Set pndoc1 = pnview1.GetDocumentByKey(CellValueB$ , True)
If Not pndoc1 Is Nothing Then
Print "Duplicate NEW Part Number: " & CellValueB$